package com.example.javaeespringioc.demos;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

@Component
public class UserBean {
    @Bean
    @Primary
    public User user1(){
        User user = new User(18,"zhangsan");
        return user;
    }
    @Bean
    public User user2(){
        User user = new User(10,"lisi");
        return user;
    }
}
